/**
 * @Title: SubjectServiceImpl
 * @Package cn.com.yiqi.wsc.service.subject.impl
 * @Description: TODO
 * Copyright: Copyright (c) 2016
 * Company: 成都壹柒互动科技有限公司
 * @author 会员系统组-林威
 * @date 2017/2/21 16:08
 * @version V1.0
 */
package cn.com.yiqi.wsc.service.subject.impl;

import cn.com.yiqi.wsc.Ro.SubjectItemVO;
import cn.com.yiqi.wsc.dao.shop.AppSubjectMapper;
import cn.com.yiqi.wsc.entity.shop.AppSubject;
import cn.com.yiqi.wsc.entity.shop.AppSubjectExample;
import cn.com.yiqi.wsc.entity.shop.AppSubjectItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 *@ClassName: SubjectServiceImpl
 * Description: TODO
 * @author 会员系统组-林威
 * @date 2017/2/21 16:08
 *
 */
@Service
public class SubjectServiceImpl {

    @Autowired
    AppSubjectMapper subjectDao;

    /**
     * 专题名称
     * */
    public List<AppSubject> findSubject(Integer type) {
        return subjectDao.selectByType(type);
    }


    /**
     * 专题详情list
     * */
    public List<SubjectItemVO> findSubjectDetail(Integer id) {
        return subjectDao.selectSubjectList(id);
    }

    /**
     * 专题信息
     * */
    public AppSubject findByid(Integer id) {
        return subjectDao.selectByPrimaryKey(id);
    }
}
